Tweak to pygrub build config detection.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 21 Oct 2005 17:19:38 +0000 (18:19 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 21 Oct 2005 17:19:38 +0000 (18:19 +0100)
Signed-off-by: Jeremy Katz <katzj@redhat.com>
tools/pygrub/setup.py

index 43e46762a8656fd3159f6ea956540155604cb46e..5e0937bbadd42b30277fdcf2dcdd943c54fe51ae 100644 (file)
@@ -13,7 +13,7 @@ if os.path.exists("/usr/include/ext2fs/ext2_fs.h"):
     cc = new_compiler()
     cc.add_library("ext2fs")
     try:
-        if cc.has_function("ext2fs_open2"):
+        if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"):
             ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) )
         else:
             sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n")